package com.nvwa.mvp.easyexcel.controller;

import com.github.pagehelper.PageInfo;
import com.nvwa.dto.query.PageQuery;
import com.nvwa.dto.resp.Response;
import com.nvwa.mvp.easyexcel.model.UserModel;
import com.nvwa.mvp.easyexcel.po.User;
import com.nvwa.mvp.easyexcel.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/excel")
    public void excel(@RequestBody PageQuery query, HttpServletResponse response) {
        userService.excel(query,response);
    }

}